#include<iostream>
using namespace std;
int main()
{
	int t;
	cin >> t;
	const char* arr[12] = { "January","February","March","April","May","June","July","Aguest","September","ctober","November","December" };
	for (int i = 0; i < t; i++) {
		int day;
		cin >> day;
		if (day <= 12) {
			cout << *(arr + day - 1) << endl;
		}
		else {
			cout << "error" << endl;
		}
	}
	return 0;
}